// import service from '@/utils/requests'
import request from '@/utils/request-java'

// 获取打印报表，运行数据 1
export function YunXing(data) {
  return request({
    url: `/OperatingDataController/list`,
    method: 'get',
    data: { ...data },
    params: { page: 1, limit: 10 }
  });
}


//  工单列表
export function WorkOrder(data) {
  return request({
    // url: `/StrokeLisdataController/list?page=${data.page}&limit=10`,
    url: `/StrokeLisdataController/list`,
    method: 'get',
    params: { ...data, limit: 10 }
  });
}



// 工单列表-根据id查详情
export function WorkOrderId(data) {
  return request({
    // url: `/StrokeLisdataController/getStroId?id=${data}`,
    url: `/StrokeLisdataController/getStroId?id=${data}`,
    method: 'get',
    // data:{...data}
    // query:{id:data}
  });
}


export function WorkOrderTime(data) {
  console.log(data);
  return request({
    // url: `/StrokeLisdataController/getStroId?id=${data}`,
    url: `/StrokeLisdataController/queryTime?startTime=${data[0]}&endTime=${data[1]}`,
    method: 'get',
    // data:{...data}
    // query:{id:data}
  });
}


// 打印报表-舒适性列表
export function ShushiList(data) {
  return request({
    url: `/ComforprintingController/list`,
    method: 'get',
    params: { ...data, limit: 10 }
  });
}


// 打印报表-冷机数据 1
export function Lengji(data) {
  return request({
    url: `/RefrigeratorDataController/list`,
    method: 'get',
    data: { ...data },
    params: { page: 1, limit: 10 }
  });
}


// // 设备列表
// export function DeviceList(data) {
//   return service({
//     url: `/getDeviceList`,
//     method: 'get',
//     data: { ...data }
//   });
// }


// // 工单配置
// export function Configuration(data) {
//   return service({
//     url: `/getConfiguration`,
//     method: 'get',
//     data: { ...data }
//   });
// }

// 修改工单列表
export function updateWorkOrder(data) {
  return request({
    url: `/StrokeLisdataController/updateWorkOrder`,
    method: 'post',
    params: data
  });
}


// 工单列表状态统计
export function getCountOrder() {
  return request({
    url: `/StrokeLisdataController/getCountOrder`,
    method: 'get',
  });
}